package com.itheima.dao;

import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface IUserDao {
    @Select("select * from userinfo")
    public List<User> findAll();


    @Select("select * from userinfo where id=#{id}")
    public User findById(int id);


    @Update("update userinfo set age=#{age},username=#{username},password=#{password},email=#{email},sex=#{sex} where id=#{id}")
    public void update(User newUser);
}
